package com.huatai.auth.service;

import lombok.Getter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @program: ht-system
 * @description: 用户信息扩展
 * @author: songxiude
 * @create: 2023-02-08 09:20
 **/
@Getter
public class HtUserDetails extends User{

	private Long id;

	private String code;

	private String name;

	private String realName;

	private String avatar;

	private Integer isAdmin;

	private Long deptId;

	private Long postId;

	private Integer skin;

	public HtUserDetails(Long id, String code, String name, String realName, String avatar, Integer isAdmin, Long deptId, Long postId, Integer skin,String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
		super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
		this.id = id;
		this.code = code;
		this.name = name;
		this.realName = realName;
		this.avatar = avatar;
		this.isAdmin = isAdmin;
		this.deptId = deptId;
		this.postId = postId;
		this.skin = skin;
	}
}
